<template>
    <div class="toplist">
     <discoverm></discoverm>
      <toplistchild ></toplistchild>
    </div>
</template>

<script>

import discoverm from '@/views/discoverM/discoverM.vue'
import toplistchild from '@/components/content/navlist/toplist/toplist_child.vue'
import { gettoplist } from "@/network/toplist.js"
import { getdislist } from "@/network/discover.js"
// import { gettlcomment } from "@/network/discover.js"

export default {
   name:'toplist' ,
   components:{
       discoverm,
       toplistchild   
   },
   data(){
       return{
           select:'19723756',
        // dislist:[],
        // tlcomment:[],
       toplist:{
           '19723756':{list:[]},
           '3779629':{list:[]},
           '2884035':{list:[]},
           '3778678':{list:[]}
       },
       toplistimg:[]
       }
   },
  
   methods:{
       gettoplist(id){
           gettoplist(id).then(res=>{
         for(var q=0;q<=99;q++){
            this.toplist[id].list.push(res.playlist.tracks[q])}
           })
       },
       selectd(gup){
           this.select=gup
          console.log(this.select)
       }
    },
       
   }
//    },
//    created(){
//         getdislist().then(res=>{
//              for(var q=0;q<=99;q++){
//                 //  this.dislist[l]=res.playlist.tracks.name[l]}
//            this.dislist.push(res.playlist.tracks[q])
//         //    this.dislistimg.push(res.playlist)
//                  }
//          }),
//         gettlcomment().then(res=>{
//              for(var n=0;n<=19;n++){
//                 //  this.dislist[l]=res.playlist.tracks.name[l]}
//            this.tlcomment.push(res.comments[n])
            
//                  }
//          })
//    }
// }}

</script>

<style>

</style>
